package a.f.h.b;

import a.c.*;
import a.c.d;
import a.c.e;
import a.f.j.cb;

public class c
{
  private static final int a = k.a.g();
  private static final int b = k.b.g();
  private static final int c = k.c.g();
  private static final int d = k.d.g();
  private static final String[] e = new String[4];
  private ab f = new ab();
  private cb h;
  private f j;
  private q k;
  public static int l;
  
  public void a(q paramq)
  {
    int i = f.m;
    boolean bool = f.l;
    do
    {
      m localm = paramq.w();
      while (!bool)
      {
        if (!localm.e()) {
          break;
        }
        if (i == 0)
        {
          if (localm.a().g())
          {
            this.f.c(localm.a());
            paramq.f(localm.a());
          }
          localm.f();
        }
      }
    } while (i != 0);
  }
  
  public void a(f paramf)
  {
    this.j = paramf;
    this.h = ((cb)this.j.b());
    this.k = this.h.a();
  }
  
  private k a(e parame)
  {
    int i9 = f.m;
    int[][] arrayOfInt = this.j.l(parame);
    int[] arrayOfInt1 = this.j.k(parame);
    int i = arrayOfInt[a][0] + arrayOfInt[b][2];
    int m = arrayOfInt1[a] + arrayOfInt1[b];
    int n = arrayOfInt[b][0] + arrayOfInt[c][2];
    int i1 = arrayOfInt1[b] + arrayOfInt1[c];
    int i2 = arrayOfInt[c][0] + arrayOfInt[d][2];
    int i3 = arrayOfInt1[c] + arrayOfInt1[d];
    int i4 = arrayOfInt[d][0] + arrayOfInt[a][2];
    int i5 = arrayOfInt1[d] + arrayOfInt1[a];
    int i6 = i;
    int i7 = m;
    int i8 = a;
    if (i9 == 0)
    {
      if (n >= i6)
      {
        if (i9 != 0) {
          break label214;
        }
        if (n == i6)
        {
          if (i9 != 0) {
            break label214;
          }
          if (i1 >= i7) {}
        }
      }
      else
      {
        i6 = n;
        i7 = i1;
      }
    }
    else {
      i8 = b;
    }
    if (i9 == 0)
    {
      if (i2 >= i6)
      {
        label214:
        if (i9 != 0) {
          break label263;
        }
        if (i2 == i6)
        {
          if (i9 != 0) {
            break label263;
          }
          if (i3 >= i7) {}
        }
      }
      else
      {
        i6 = i2;
        i7 = i3;
      }
    }
    else {
      i8 = c;
    }
    if (i9 == 0)
    {
      if (i4 >= i6)
      {
        label263:
        if (i9 != 0) {
          break label305;
        }
        if (i4 == i6)
        {
          if (i9 != 0) {
            break label305;
          }
          if (i5 >= i7) {}
        }
      }
      else
      {
        i6 = i4;
        i7 = i5;
      }
    }
    else {
      i8 = d;
    }
    label305:
    return k.a(i8);
  }
  
  private void a(e parame, k paramk, ab paramab)
  {
    int m = f.m;
    boolean bool = f.l;
    if (((m == 0) && (paramab == null)) || (paramab.size() == 0)) {
      return;
    }
    d locald1 = null;
    Object localObject1 = parame.n();
    while (((m)localObject1).e())
    {
      if (this.j.e(((m)localObject1).a()) > 0)
      {
        locald1 = ((m)localObject1).a();
        break;
      }
      ((m)localObject1).f();
    }
    localObject1 = null;
    Object localObject2 = null;
    Object localObject4;
    d locald2;
    if (m == 0)
    {
      if (locald1 != null) {
        localObject1 = null;
      }
    }
    else
    {
      localObject3 = this.j.i(locald1);
      localObject4 = parame.b(locald1);
      int i = 0;
      if (i < ((m)localObject4).k()) {}
      for (;;)
      {
        if (m == 0)
        {
          locald2 = ((m)localObject4).a();
          if (!bool)
          {
            if (m == 0)
            {
              if (!a((k)localObject3, this.j.i(locald2), paramk))
              {
                localObject1 = locald2;
                ((m)localObject4).b();
                i++;
              }
            }
            else {
              if (!bool) {
                break;
              }
            }
            localObject4 = parame.b((d)localObject1);
            if (m != 0) {
              continue;
            }
            ((m)localObject4).b();
          }
        }
      }
      localObject2 = ((m)localObject4).a();
    }
    Object localObject3 = paramab.o();
    this.k.g((d)localObject3);
    if (m == 0)
    {
      if (locald1 == null)
      {
        localObject4 = this.h.a((d)localObject3);
        this.j.a((d)localObject3, e[paramk.g()]);
        this.j.g((d)localObject3);
        this.j.a((d)localObject3, 3);
        this.j.a((d)localObject4, 1);
        this.h.f();
        this.h.a(this.h.b().a());
        if (m != 0) {
          break label457;
        }
        if (!bool) {}
      }
      else
      {
        this.h.b((d)localObject2, (d)localObject3);
      }
    }
    else
    {
      localObject4 = this.j.a((d)localObject3);
      this.j.a((d)localObject3, e[paramk.g()]);
      this.j.g((d)localObject3);
      this.j.a((d)localObject3, a((d)localObject1, (d)localObject3));
      this.j.a((d)localObject4, 1);
      this.j.a((d)localObject2, a((d)localObject4, (d)localObject2));
      this.h.e();
    }
    localObject1 = localObject3;
    localObject2 = localObject4;
    label457:
    m localm = paramab.l();
    do
    {
      if (!localm.e()) {
        break;
      }
      locald2 = localm.a();
      this.k.g(locald2);
      this.h.b((d)localObject2, locald2);
      d locald3 = this.j.a(locald2);
      this.j.a(locald2, e[paramk.g()]);
      this.j.g(locald2);
      this.j.a(locald2, 0);
      this.j.a(locald3, 1);
      this.j.a((d)localObject2, 0);
      this.h.e();
      localObject1 = locald2;
      localObject2 = locald3;
      localm.f();
    } while (!bool);
  }
  
  private boolean a(k paramk1, k paramk2, k paramk3)
  {
    String str = "^>_<^>_<";
    int i = str.indexOf(paramk1.toString());
    int m = str.indexOf(paramk2.toString(), i);
    int n = str.indexOf(paramk3.toString(), i);
    if (f.m == 0) {}
    return m > n;
  }
  
  private int a(d paramd1, d paramd2)
  {
    String str = "^>_<^>_<";
    int i = this.j.f(paramd1).charAt(0);
    int m = this.j.f(paramd2).charAt(0);
    int n = str.indexOf(i);
    int i1 = str.indexOf(m, n);
    return i1 - n;
  }
  
  public void a()
  {
    int m = f.m;
    boolean bool = f.l;
    ab[] arrayOfab = new ab[this.k.k()];
    Object localObject1 = this.f.l();
    Object localObject2;
    do
    {
      if (!((m)localObject1).e()) {
        break;
      }
      localObject2 = ((m)localObject1).a();
      int i = ((d)localObject2).e().f();
      if (m == 0) {
        if (arrayOfab[i] == null) {
          arrayOfab[i] = new ab();
        }
      }
      arrayOfab[i].add(localObject2);
      ((m)localObject1).f();
    } while (!bool);
    localObject1 = this.k.v();
    do
    {
      if (!((w)localObject1).e()) {
        break;
      }
      localObject2 = ((w)localObject1).d();
      if (m == 0)
      {
        if (arrayOfab[localObject2.f()] != null) {
          a((e)localObject2, a((e)localObject2), arrayOfab[localObject2.f()]);
        }
        ((w)localObject1).f();
      }
    } while (!bool);
  }
  
  static
  {
    e[a] = "^>_<";
    e[b] = ">_<^";
    e[c] = "_<^>";
    e[d] = "<^>_";
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.h.b.c

 * JD-Core Version:    0.7.0.1

 */